(function() {

	GameImageQuiz = function(rpc, params) {
		this.rpc = rpc;
		this.params = params;
		this.is_background = false;
	};

	GameImageQuiz.prototype = {
		start : function(is_background) {
			var self = this, img, fct, container = $("#image_container");
			container.empty();
			for (var key in this.params) {
				fct = function(event) {self.clicked(key)};
				img = $("<img />").attr({'src' : this.params[key]});
				img.bind("click", fct);
				container.append($("<div />").css('text-align', 'center').append(img));
			}
		},
		
		show : function() {
			$('#screen_game_image_quiz').show();
		},
		hide : function() {
			$('#screen_game_image_quiz').hide();
		},
		clicked : function(image_name) {
			this.rpc.send_image_quiz_event(image_name);
		},
		
		stop : function() {
		}
	};

})();